interface IAddress {
    id?: number
    receiverProvince?: number
    receiverCity?: number
    receiverDistrict?: number
    receiverAddress?: string
    receiverName?: string
    receiverMobile?: string
    receiverPhone?: string
    receiverDefault?: number
}

interface IPhotoList {
    id: number
    photoUrl: string
    productId: number
}

interface IGoodsDetail {
    id?: number
    name?: string
    stock?: number
    price?: number
    status?: number
    mainImage?: string
    subtitle?: string
    sale?: number
    detail?: string
    categoryId?: number
    sysPhotoList?: Array<IPhotoList>
}

interface IDetailSubmit {
    canPurchase?: any
    canPurchaseCount?: number
}

interface ICurrentSubmit {
    goodsNum?: number
    goodsInfo?: IGoodsDetail
}

interface IOrderDetail {
    orderNo: string
    price: number
}

export interface IState {
    currentChooseAddress: IAddress
    detailSubmitInfo: IDetailSubmit
    currentSubmitOrderInfo: ICurrentSubmit
    currentOrderDetail: IOrderDetail
}

interface ISetChooseAddress extends IAddress {
}

interface ISetGoodsDetailSubmitParams {
    canPurchase: any
    canPurchaseCount: number
}

interface ISetOrderInfoParams {
    goodsNum: number
    goodsInfo: IGoodsDetail
}

interface IOrderSubmitParams {
    goodsNum: number
    goodsInfo: IGoodsDetail
    paymentType: number
}

interface ICreatePayParams {
    orderNo: string
    price?: number
    paymentType: number
    from?: string
}

export interface IActions {
    resetChooseAddressAction: () => void
    setChooseAddressAction: (params: ISetChooseAddress) => boolean
    setGoodsDetailSubmitAction: (params: ISetGoodsDetailSubmitParams) => void
    setOrderInfoAction: (params: ISetOrderInfoParams) => void
    orderSubmitAction: (params: IOrderSubmitParams) => Promise<boolean>
    createPayAction: (params: ICreatePayParams) => Promise<void | string>
}
